# from web.page import BasePage
# from selenium.webdriver.common.by import By
# import random
# class ProductsPage(BasePage):
#
#     url = 'http://huicewang.com/ecshop/'
#     best_products_area_loc = (By.XPATH,'//*[@id="show_best_area"]/div[@class="goodsItem"]/a')
#     def __get__(self, instance, owner):
#         print(type(instance))
#
#     def selectRandomProduct(self):
#         elements = self.find_elements(*self.best_products_area_loc)
#         index = random.randint(0,len(elements) - 1)
#         elements[index].click()
#
#         print(float(self.find_element(By.ID,'ECS_SHOPPRICE').text[1:-1]))
# class T:
#     p = ProductsPage()
#
#     def a(self):
#         print(self.p)
#

class Element:
    def __get__(self, instance, owner):
        print('慧测欢迎您')
        print(instance.driver)
        print(owner)
        return self

    def mm(self):
        print('8888888888')


class Page1:
    haha = '999999999'
    driver = '大家好呀'
    t1 = Element()

    t2 = Element()

if __name__ == '__main__':
    p1 = Page1()
    p1.t1
    # p1.t1.mm()
    # print(p1.t1)